unit Splash;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, StdCtrls, Mask, ComCtrls;

type
  TSplashForm = class(TForm)
    Panel1: TPanel;
    Progress: TProgressBar;
    Label1: TLabel;
    Label2: TLabel;
    PageControl: TPageControl;
    DomainTab: TTabSheet;
    OtherTab: TTabSheet;
    Login: TEdit;
    Password: TMaskEdit;
    Label3: TLabel;
    Label4: TLabel;
    procedure PasswordKeyPress(Sender: TObject; var Key: Char);
    procedure LoginKeyPress(Sender: TObject; var Key: Char);
    procedure Label2Click(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
    procedure Label4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SplashForm: TSplashForm;
  MayClose: Boolean;

implementation
  uses Main;
{$R *.dfm}

procedure TSplashForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  CanClose := MayClose;
end;

procedure TSplashForm.Label2Click(Sender: TObject);
begin
  MainForm.LoginTrue;
end;

procedure TSplashForm.Label4Click(Sender: TObject);
begin
  PageControl.ActivePage := OtherTab;
  Login.SetFocus;
end;

procedure TSplashForm.LoginKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #13 then
    begin
      MainForm.LoginTrue;
    end;
end;

procedure TSplashForm.PasswordKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #13 then
    begin
      MainForm.LoginTrue;
    end;
end;

end.
